--#SET TERMINATOR @

-- Drop table 'ALLDATATYPES'
BEGIN
  IF EXISTS (SELECT * FROM SYSCAT.TABLES
             WHERE TABSCHEMA = CURRENT_SCHEMA
             AND TABNAME = 'ALLDATATYPES') THEN
    EXECUTE IMMEDIATE 'DROP TABLE ALLDATATYPES';
  END IF;
END @

-- Drop table 'DEPARTMENTS'
BEGIN
  IF EXISTS (SELECT * FROM SYSCAT.TABLES
             WHERE TABSCHEMA = CURRENT_SCHEMA
             AND TABNAME = 'DEPARTMENTS') THEN
    EXECUTE IMMEDIATE 'DROP TABLE DEPARTMENTS';
  END IF;
END @

-- Drop table 'EMPLOYEES'
BEGIN
  IF EXISTS (SELECT * FROM SYSCAT.TABLES
             WHERE TABSCHEMA = CURRENT_SCHEMA
             AND TABNAME = 'EMPLOYEES') THEN
    EXECUTE IMMEDIATE 'DROP TABLE EMPLOYEES';
  END IF;
END @

-- Drop table 'ITEMBRANCHES'
BEGIN
  IF EXISTS (SELECT * FROM SYSCAT.TABLES
             WHERE TABSCHEMA = CURRENT_SCHEMA
             AND TABNAME = 'ITEMBRANCHES') THEN
    EXECUTE IMMEDIATE 'DROP TABLE ITEMBRANCHES';
  END IF;
END @

-- Drop table 'ITEMS'
BEGIN
  IF EXISTS (SELECT * FROM SYSCAT.TABLES
             WHERE TABSCHEMA = CURRENT_SCHEMA
             AND TABNAME = 'ITEMS') THEN
    EXECUTE IMMEDIATE 'DROP TABLE ITEMS';
  END IF;
END @

-- Drop table 'TESTFOREIGNKEYOPTIONS'
BEGIN
  IF EXISTS (SELECT * FROM SYSCAT.TABLES
             WHERE TABSCHEMA = CURRENT_SCHEMA
             AND TABNAME = 'TESTFOREIGNKEYOPTIONS') THEN
    EXECUTE IMMEDIATE 'DROP TABLE TESTFOREIGNKEYOPTIONS';
  END IF;
END @

-- Drop table 'TESTFOREIGNKEYOPTIONS2'
BEGIN
  IF EXISTS (SELECT * FROM SYSCAT.TABLES
             WHERE TABSCHEMA = CURRENT_SCHEMA
             AND TABNAME = 'TESTFOREIGNKEYOPTIONS2') THEN
    EXECUTE IMMEDIATE 'DROP TABLE TESTFOREIGNKEYOPTIONS2';
  END IF;
END @

-- Drop table 'TESTFOREIGNKEYOPTIONS3'
BEGIN
  IF EXISTS (SELECT * FROM SYSCAT.TABLES
             WHERE TABSCHEMA = CURRENT_SCHEMA
             AND TABNAME = 'TESTFOREIGNKEYOPTIONS3') THEN
    EXECUTE IMMEDIATE 'DROP TABLE TESTFOREIGNKEYOPTIONS3';
  END IF;
END @

-- Drop table 'TESTFOREIGNKEYOPTIONS4'
BEGIN
  IF EXISTS (SELECT * FROM SYSCAT.TABLES
             WHERE TABSCHEMA = CURRENT_SCHEMA
             AND TABNAME = 'TESTFOREIGNKEYOPTIONS4') THEN
    EXECUTE IMMEDIATE 'DROP TABLE TESTFOREIGNKEYOPTIONS4';
  END IF;
END @

-- Drop table 'ZIPCODES'
BEGIN
  IF EXISTS (SELECT * FROM SYSCAT.TABLES
             WHERE TABSCHEMA = CURRENT_SCHEMA
             AND TABNAME = 'ZIPCODES') THEN
    EXECUTE IMMEDIATE 'DROP TABLE ZIPCODES';
  END IF;
END @

